import request from '@/utils/request'

// 查询采购订单列表(新)
export function queryPoorderLists(data) {
  return request({
    url: '/tPurPoorder/queryPoorderLists',
    method: 'post',
    data
  })
}
// 查询采购订单 业务操作-配置
export function queryCommon(data) {
  return request({
    url: '/tSecUser/queryBillCommonList',
    method: 'post',
    data
  })
}
// 查询采购订单 业务操作-配置 确认
export function updateCommon(data) {
  return request({
    url: '/tBaseDataDictionary/updateDataDictionaryList',
    method: 'post',
    data
  })
}
// 个性化查询 是否批量填充
export function updateIsFill(data) {
  return request({
    url: '/tJxQuerySet/updateIsFill',
    method: 'post',
    data
  })
}
// 查询采购订单详情
export function queryPoorderDetails(params) {
  return request({
    url: '/tPurPoorder/queryPoorderDetails',
    method: 'get',
    params
  })
}
// 销售申请下推销售订单
export function pushapply(data) {
  return request({
    url: '/tSaleOrder/pushapply',
    method: 'post',
    data
  })
}

// 查询单据类型
export function queryBillType(params) {
  return request({
    url: '/tBasBilltype/queryBillType',
    method: 'get',
    params
  })
}
// 根据供应商查询价目表
export function queryPriceList(data) {
  return request({
    url: '/tPurPoorder/queryPriceList',
    method: 'post',
    data
  })
}
// 查询负责人接口(采购员)
export function queryBuyerList(data) {
  return request({
    url: '/vBdBuyer/queryBuyerList',
    method: 'post',
    data
  })
}
// 修改采购订单
export function updatePoorder(data) {
  return request({
    url: '/tPurPoorder/updatePoorder',
    method: 'put',
    data
  })
}
// 通过价目表查询单价和含税单价
export function queryPoorderPrice(data) {
  return request({
    url: '/tPurPricelist/queryPurListPrice',
    method: 'post',
    data
  })
}
// 下推采购
export function queryPushDownPur(data) {
  return request({
    url: '/tPurPoorder/pushStkStock',
    method: 'post',
    data
  })
}
// 查询仓管员
export function FNOTEqueryStockerList(data) {
  return request({
    url: '/common/queryStaffUserList',
    method: 'post',
    data
  })
}
// 查询下推采购订单信息--退料
export function queryPushDownMrb(data) {
  return request({
    url: '/tPurMrb/queryPushDownMrb',
    method: 'post',
    data
  })
}
// 审核采购订单
export function purPooAudit(data) {
  return request({
    url: '/tPurPoorder/purPooAudit',
    method: 'put',
    data
  })
}
// 反审核采购订单
export function purPooUnAudit(data) {
  return request({
    url: '/tPurPoorder/purPooUnAudit',
    method: 'put',
    data
  })
}
// 反提交采购订单
export function purPooAuSubmit(data) {
  return request({
    url: '/tPurPoorder/purPooAuSubmit',
    method: 'put',
    data
  })
}
// 提交采购订单
export function purPooSubmit(data) {
  return request({
    url: '/tPurPoorder/purPooSubmit',
    method: 'put',
    data
  })
}
// 反禁用采购订单
export function purPooUndisable(data) {
  return request({
    url: '/tPurPoorder/purPooUndisable',
    method: 'put',
    data
  })
}
// 禁用采购订单
export function purPoodisable(data) {
  return request({
    url: '/tPurPoorder/purPoodisable',
    method: 'put',
    data
  })
}
// 关闭采购订单
export function purPooClose(data) {
  return request({
    url: '/tPurPoorder/purPooClose',
    method: 'put',
    data
  })
}
// 反关闭采购订单
export function purPooUnClose(data) {
  return request({
    url: '/tPurPoorder/purPooUnClose',
    method: 'put',
    data
  })
}
// 删除采购订单
export function purPooDelete(data) {
  return request({
    url: '/tPurPoorder/purPooDelete',
    method: 'delete',
    data
  })
}
// 查询下推销售订单信息- 发货通知单
export function queryPushDelSal(data) {
  return request({
    url: '/tSalDeliverynotice/pushDel',
    method: 'post',
    data
  })
}
// 新增销售出库单
export function insertSalOut(data) {
  return request({
    url: '/tSalOutstock/insertSalOut',
    method: 'post',
    data
  })
}

// 获取本位币
export function queryPricelistHeader(data) {
  return request({
    url: '/tPurPricelist/queryPricelistHeader',
    method: 'post',
    data
  })
}

// 删除采购订单
export function deletePoorder(data) {
  return request({
    url: '/tPurPoorder/deletePoorder',
    method: 'delete',
    data
  })
}
// 采购订单 操作记录
export function queryPurPoorderLog(data) {
  return request({
    url: '/TJxLog/queryPurPoorderLog',
    method: 'post',
    data
  })
}
// 采购订单 批量单价
export function batchPoorderPrice(data) {
  return request({
    url: '/tPurPoorder/batchPoorderPrice',
    method: 'post',
    data
  })
}

// 查询采购申请列表
export function queryRequistionList(data) {
  return request({
    url: '/tPurRequisition/queryRequistionList',
    method: 'post',
    data
  })
}
// 查询采购审批列表
export function queryRequistionApprovalList(data) {
  return request({
    url: '/tPurRequisition/queryRequistionApprovalList',
    method: 'post',
    data
  })
}
// 查询价目审批列表
export function queryTPurPriceApprovalList(data) {
  return request({
    url: '/tPurPricelist/queryTPurPriceApprovalList',
    method: 'post',
    data
  })
}
// 采购审批不同意
export function requistionDisagree(data) {
  return request({
    url: '/tPurRequisition/requistionDisagree',
    method: 'put',
    data
  })
}
// 价目审批不同意
export function purAuditUnApproval(data) {
  return request({
    url: '/tPurPricelist/purAuditUnApproval',
    method: 'put',
    data
  })
}
// 删除采购申请列表
export function deleteRequistion(data) {
  return request({
    url: '/tPurRequisition/requistionDelete',
    method: 'post',
    data
  })
}
// 查询物料--库存数量
export function queryMaterialArrayInventory(data) {
  return request({
    url: '/tStkInventory/queryMaterialArrayInventory',
    method: 'post',
    data
  })
}
// 审核采购申请列表
export function requistionAudit(data) {
  return request({
    url: '/tPurRequisition/requistionAudit',
    method: 'put',
    data
  })
}
// 反审核采购申请列表
export function requistionUnAudit(data) {
  return request({
    url: '/tPurRequisition/requistionUnAudit',
    method: 'put',
    data
  })
}
// 反提交采购申请列表
export function requistionAuSubmit(data) {
  return request({
    url: '/tPurRequisition/requistionAuSubmit',
    method: 'put',
    data
  })
}
// 提交采购申请列表
export function requistionSubmit(data) {
  return request({
    url: '/tPurRequisition/requistionSubmit',
    method: 'put',
    data
  })
}
// fan禁用采购申请列表
export function requistionUndisable(data) {
  return request({
    url: '/tPurRequisition/requistionUndisable',
    method: 'put',
    data
  })
}
// 禁用申请列表
export function requistiondisable(data) {
  return request({
    url: '/tPurRequisition/requistiondisable',
    method: 'put',
    data
  })
}
// 关闭申请列表
export function requistionClose(data) {
  return request({
    url: '/tPurRequisition/requistionClose',
    method: 'put',
    data
  })
}
// 反关闭申请列表
export function requistionUnClose(data) {
  return request({
    url: '/tPurRequisition/requistionUnClose',
    method: 'put',
    data
  })
}
// 终止申请列表
export function requistionStop(data) {
  return request({
    url: '/tPurRequisition/requistionStop',
    method: 'put',
    data
  })
}
// 反终止申请列表
export function requistionAuStop(data) {
  return request({
    url: '/tPurRequisition/requistionAuStop',
    method: 'put',
    data
  })
}
// 反终止hang
export function requistionDtlAuStop(data) {
  return request({
    url: '/tPurRequisition/requistionDtlAuStop',
    method: 'put',
    data
  })
}
// 终止hang
export function requistionDtlStop(data) {
  return request({
    url: '/tPurRequisition/requistionDtlStop',
    method: 'put',
    data
  })
}
// 采购订单推送惠州杰希销售订单
export function purPushSal(data) {
  return request({
    url: '/tPurPoorder/purPushSal',
    method: 'post',
    data
  })
}
// 采购调价表审批列表
export function queryTPurPatApprovalList(data) {
  return request({
    url: '/tPurPat/queryTPurPatApprovalList',
    method: 'post',
    data
  })
}
// 采购价目审核不同意
export function tPurPatAuditUnApproval(data) {
  return request({
    url: '/tPurPat/tPurPatAuditUnApproval',
    method: 'post',
    data
  })
}
// 采购申请明细行审核
export function audit(data) {
  return request({
    url: '/tPurRequisition/requistionDtl/audit',
    method: 'post',
    data
  })
}
// 采购申请明细行反审核
export function reAudit(data) {
  return request({
    url: '/tPurRequisition/requistionDtl/reAudit',
    method: 'post',
    data
  })
}
// 采购申请明细修改
export function update(data) {
  return request({
    url: '/tPurRequisition/requistionDtl/update',
    method: 'post',
    data
  })
}
// 采购申请明细删除
export function deletes(data) {
  return request({
    url: '/tPurRequisition/requistionDtl/delete',
    method: 'post',
    data
  })
}
